#ifndef __AM_MD5_H
#define __AM_MD5_H

#include <stddef.h>
#include <stdint.h>


#define HASHSIZE       16

#ifdef __cplusplus
 extern "C" {
#endif

typedef uint32_t WORD32;

typedef struct md5_t {
  WORD32 d[4];
  size_t len;
} md5_t;

extern md5_t g_md5_t;

void md5_init   (md5_t *m);
int  md5_update (md5_t *m, const char *message, size_t len);
void md5_finish (md5_t *m, char output[HASHSIZE]);
void md5 (const char *message, size_t len, char output[HASHSIZE]);


#ifdef __cplusplus
}
#endif
#endif
